<?php


namespace apps\marriage\core\logic;


class RegionLogic
{
    public function tree()
    {
        $data = base_api_get('base', '/region/tree', null);
        return $data;
    }

    public function all()
    {
        $data = base_api_get('base', '/region/all', null);
        return $data;
    }

    public function info($regionId)
    {
        $data = base_api_get('base', '/region/info', ['region_id' => $regionId]);
        return $data;
    }

    public function children($regionId)
    {
        $data = base_api_get('base', '/region/children', ['region_id' => $regionId]);
        return $data;
    }

    public function parents($regionId)
    {
        $data = base_api_get('base', '/region/parents', ['region_id' => $regionId]);
        return $data;
    }

    public function lists($parentId)
    {
        $data = base_api_get('base', '/region/lists', ['parent_id' => $parentId]);
        return $data;
    }
}